package com.loves.admin.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.loves.admin.model.ProductCategory;
import org.apache.ibatis.annotations.Select;

public interface ProductCategoryMapper extends BaseMapper<ProductCategory> {

    @Select("select * from pms_product_category where delete_falg =false and parent_id = 1")
    IPage<ProductCategory> selectByParent(Page<ProductCategory> page);

    @Select("select * from pms_product_category where delete_falg =false and parent_id = #{id}")
    IPage<ProductCategory> selectByItem(Page<ProductCategory> page, String id);
}
